def clock_it_deco(func):
    def wapper(*args):
        start_time = time.time()
        result = func(*args)
        end_time = time.time()
        print(f"{func.__name__} execute spent {format(end_time - start_time, '.4f')} s")
        return result
    return wapper


@clock_it_deco
def foo(a, b):
    count = 1
    while True:
        if count > a ** b:
            break
        else:
            count += 1


foo(100, 3)